# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=vinagre
pkgver=3.22.0
pkgrel=2
pkgdesc="VNC client for the GNOME desktop"
url="https://wiki.gnome.org/Apps/Vinagre"
arch="all !s390x !riscv64" # spice-gtk
license="GPL-2.0-or-later"
depends="openssh dbus:org.freedesktop.Secrets"
makedepends="libxml2-dev intltool itstool glib-dev libsecret-dev spice-gtk-dev
	telepathy-glib-dev vte3-dev gtk-vnc-dev avahi-dev avahi-ui-dev vala"
subpackages="$pkgname-doc $pkgname-lang"
source="https://download.gnome.org/sources/vinagre/${pkgver%.*}/vinagre-$pkgver.tar.xz
	gcc-10.patch
	"

prepare() {
	default_prepare

	update_config_sub
	update_config_guess
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-compile-warnings \
		--enable-spice \
		--enable-ssh \
		--with-gnome
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="6a84b353d75b48649af507cb747688115b35268bc0303554afc9684bbfec4f9c3b2d93d89fa64480ede07bb4fb1eabe360b6eccd11e58691ce9f955f329c615f  vinagre-3.22.0.tar.xz
4c6ff2bcea74e331b92014ebbe14cd9d81951b4f1228df1969b34556eff4bb40727886bfc0d400405645c6757ad07abf358a18bee85cfbf96915d5bb2ab09559  gcc-10.patch"
